<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="/node_modules/layui-src/dist/css/layui.css">
    <link rel="stylesheet" href="/public/css/main.css">
</head>
<body class="layui-layout-body">
  <div class="layui-layout layui-layout-admin">
    <!-- 头部区域 -->
    <div class="layui-header">
      <div class="layui-logo">留言板</div>
      <ul class="layui-nav layui-layout-left">
        <li class="layui-nav-item"><a href="/">首页</a></li>
        <li class="layui-nav-item"><a href="/student/add">添加评论</a></li>
        <li class="layui-nav-item">
          <a href="javascript:;">更多功能</a>
          <dl class="layui-nav-child">
            <dd><a href="">暂无更多</a></dd>
          </dl>
        </li>
      </ul>
      <ul class="layui-nav layui-layout-right">
        <li class="layui-nav-item">
          <a href="javascript:;">
            <img src="http://t.cn/RCzsdCq" class="layui-nav-img">
            小明
          </a>
          <dl class="layui-nav-child">
            <dd><a href="">暂无更多</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item"><a href="">退了</a></li>
      </ul>
    </div>

    <!-- 左侧导航区域 -->
    <div class="layui-side layui-bg-black">
      <div class="layui-side-scroll">
        <ul class="layui-nav layui-nav-tree"  lay-filter="test">
          <li class="layui-nav-item layui-nav-itemed">
            <a class="" href="javascript:;">系统功能</a>
            <dl class="layui-nav-child">
              <dd><a href="javascript:;">暂无更多</a></dd>
            </dl>
          </li>
          <li class="layui-nav-item"><a href="">发布商品</a></li>
        </ul>
      </div>
    </div>

    <!-- 内容主体区域 -->
    <div class="layui-body">
      <div style="padding: 15px;">
        <!-- start -->
        <blockquote class="layui-elem-quote blockquote-sp">
          学生信息表<button class="layui-btn layui-btn-primary" onclick="window.location.href = '/student/add'">添加信息</button>
        </blockquote>
        <table class="layui-table">
          <colgroup>
            <col width="150">
            <col width="200">
            <col>
          </colgroup>
          <thead>
            <tr>
              <th>ID</th>
              <th>姓名</th>
              <th>性别</th>
              <th>年龄</th>
              <th>爱好</th>
              <th>编辑</th>
            </tr> 
          </thead>
          <tbody>
            {{each students}}
            <tr>
              <td>{{$value.id}}</td>
              <td>{{$value.name}}</td>
              <td>{{if $value.gender === '0'}}男{{else if $value.gender === '1'}}女{{/if}}</td>
              <td>{{$value.age}}</td>
              <td>{{$value.hobby}}</td>
              <td>
                <button	class="layui-btn layui-btn-sm" onclick="editMsg({{$value.id}})">修改</button>
                <button	class="layui-btn layui-btn-sm layui-btn-danger" onclick="deleteMsg({{$value.id}})">删除</button>
              </td>
            </tr>
            {{/each}}
          </tbody>
        </table>
        <!-- end -->
      </div>
    </div>

    <!-- 底部固定区域 -->
    <div class="layui-footer">
      © layui.com
    </div>

  </div>
  <script src="/node_modules/layui-src/dist/layui.js"></script>
  <script src="/public/js/main.js"></script>
</body>
</html>